package eScrum.panels;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;

public class InfoDialog extends Panel {

	private static final long serialVersionUID = 1L;

	public InfoDialog(String id, String message) {
		super(id);

		add(new Label("message", Model.<String> of(message)));

		add(new AjaxLink<Void>("ok") {
			private static final long serialVersionUID = 1L;

			@Override
			public void onClick(AjaxRequestTarget target) {
				ModalWindow.closeCurrent(target);
				onOk(target);
			}
		});

	}

	public void onOk(AjaxRequestTarget target) {
	}
}